package com.bigteddy.BankMark;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class BankMarkActivity extends TabActivity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Resources res = getResources(); // Resource object to get Drawables
		TabHost tabHost = getTabHost(); // The activity TabHost
		TabHost.TabSpec spec; // Resusable TabSpec for each tab
		Intent intent; // Reusable Intent for each tab

		// Fibonacci

		intent = new Intent().setClass(this, FibonacciActivity.class);
		spec = tabHost
				.newTabSpec("fibonacci")
				.setIndicator("Fibonacci",
						res.getDrawable(R.drawable.ic_tab_fibonacci))
				.setContent(intent);
		tabHost.addTab(spec);

		//Pi
		intent = new Intent().setClass(this, PiActivity.class);

		spec = tabHost.newTabSpec("pi")
				.setIndicator("Pi", res.getDrawable(R.drawable.ic_tab_pi))
				.setContent(intent);

		tabHost.addTab(spec);

		//Prime
		intent = new Intent().setClass(this, PrimeActivity.class);

		spec = tabHost
				.newTabSpec("prime")
				.setIndicator("Primes",
						res.getDrawable(R.drawable.ic_tab_prime))
				.setContent(intent);

		tabHost.addTab(spec);

		//About
		intent = new Intent().setClass(this, AboutActivity.class);

		spec = tabHost
				.newTabSpec("about")
				.setIndicator("About", res.getDrawable(R.drawable.ic_tab_about))
				.setContent(intent);

		tabHost.addTab(spec);

	}
}